Add colab extra for Colab-compatible dependency bounds - #49
Open
masci wants to merge 4 commits into
Open
Conversation
rich, opentelemetry-sdk, and opentelemetry-exporter-otlp had overly tight lower bounds that conflicted with packages pre-installed in Colab (google-adk, bigframes, pyiceberg). Relaxed to the minimum versions where the APIs we actually use are stable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
google-adk 2.7.0 requires opentelemetry-api and opentelemetry-sdk <=1.43. Adding upper bounds prevents pip from resolving to 1.44 in environments like Colab where google-adk is pre-installed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Colab pre-installs google-adk (caps opentelemetry at <1.44) and bigframes/pyiceberg (cap rich at <15). Rather than constraining the base install for all users, expose a colab extra that applies the tighter bounds only when needed. Usage: pip install "elastic-evals[colab]" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates packaging metadata to improve Google Colab installation compatibility by relaxing lower bounds on core dependencies and introducing a dedicated colab extra with upper caps aligned to Colab’s commonly preinstalled packages.
Changes:
- Relax base dependency lower bounds for
rich,opentelemetry-sdk, andopentelemetry-exporter-otlp. - Add a
colaboptional dependency extra that capsrichand key OpenTelemetry packages to<1.44/<15for Colab-friendly resolution.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
milistu
requested changes
Aug 20, 2026
Contributor
There was a problem hiding this comment.
TL;DR
- Document
uv addfor uv projects andpip/uv pipfor existing envs like Colab - Lower runtime floors to the oldest versions we actually need, across the board
- Point Dependabot at
uv.lockonly (lockfile-only) - Leave
pyproject.tomlfloors alone until a real API or compatibility reason appears
Explanation
I dug deeper and have findings and proposals on how to tackle this problem, not only for Colab but in general.
This is the current status:
- When we use
pip installin Colab and get errors, the package was actually installed, but now dependencies were changed for other packages already pre-installed in the Colab venv. This is a problem for user experience (seeing errors) and from a technical perspective (we made the Colab env internally inconsistent)
$ pip install git+https://github.com/elastic/elastic-evals-sdk-pytho
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
google-adk 2.7.0 requires opentelemetry-api<=1.43,>=1.39, but you have opentelemetry-api 1.44.0 which is incompatible.
google-adk 2.7.0 requires opentelemetry-sdk<=1.43,>=1.39, but you have opentelemetry-sdk 1.44.0 which is incompatible.
pyiceberg 0.11.1 requires rich<15.0.0,>=10.11.0, but you have rich 15.0.0 which is incompatible.
bigframes 2.42.0 requires rich<14,>=12.4.4, but you have rich 15.0.0 which is incompatible.- When we use
uv pip install, the user experience is better because we do not see any errors, but the "technical" problem is still there (we broke the Colab env)
$ uv pip install "git+https://github.com/elastic/elastic-evals-sdk-python.git"
Using Python 3.12.13 environment at: /usr
Resolved 39 packages in 1.25s
Prepared 10 packages in 1.79s
Uninstalled 4 packages in 64ms
Installed 10 packages in 16ms
+ elastic-evals==0.1.0 (from git+https://github.com/elastic/elastic-evals-sdk-python.git@dafa8a79640fea4246ac92abdc3283cb1a1dfdd3)
- opentelemetry-api==1.43.0
+ opentelemetry-api==1.44.0
+ opentelemetry-exporter-otlp==1.44.0
+ opentelemetry-exporter-otlp-proto-common==1.44.0
+ opentelemetry-exporter-otlp-proto-grpc==1.44.0
+ opentelemetry-exporter-otlp-proto-http==1.44.0
+ opentelemetry-proto==1.44.0
- opentelemetry-sdk==1.43.0
+ opentelemetry-sdk==1.44.0
- opentelemetry-semantic-conventions==0.64b0
+ opentelemetry-semantic-conventions==0.65b0
- rich==13.9.4
+ rich==15.0.0Expanding on the existing problem:
- We want to loosen the floors for our dependencies, but not only for Colab-affected packages. We need to do it for all of them
- This is not only a problem in Colab, but it is also a problem in any customer venvs that are not up to date, or CI images, etc.
- That way me make sure that we are aligned with any future Colab images, CI images, and customer venvs
Solution that I would take:
- Loosen floors: all project dependencies should be the "oldest versions we actually need" and that are secure
- Dependabot update: we need to set
versioning-strategy: lockfile-onlyso Dependabot updates onlyuv. lock, and it does not constantly increase versions inpyproject.toml - Readme update: our current readme promotes
uv add, which is okay, but it does not work in Colab because it is not a uv project. But it has uv installed, and we should add another option, which isuv pip install "git+https://github.com/elastic/elastic-evals-sdk-python.git, besidesuv addand an explanation of when to use which - Manual
pyproject.tomlupdates:uv.lockwill be updated weekly as it is currently, butpyproject.tomlwill now be updated manually, and it should be relatively rare. We should updatepyproject.tomlwhen code needs a newer API, a specific version is known to be broken, or because of a security fix
milistu
self-requested a review
August 20, 2026 14:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
richlower bound from>=15.0.0to>=13.0.0in the base dependenciescolabextra that capsrich,opentelemetry-api,opentelemetry-sdk, andopentelemetry-exporter-otlpto versions compatible with Colab's pre-installed packages (google-adk,bigframes,pyiceberg)Problem
Installing in Google Colab produced dependency conflicts because Colab pre-installs
google-adk(which capsopentelemetry-api/sdkat<1.44) andbigframes/pyiceberg(which caprichat<15).Usage in Colab
Test plan
elastic-evals[colab]in a Colab notebook and verify no dependency conflict warnings🤖 Generated with Claude Code